#include <stdio.h>
#include <string.h>
int main()
{
    char data[62];
    while ( scanf("%s", data) != EOF )
    {
        int lenth = strlen( data ), i;
        int a[ lenth ];
        bool t;
        t = true;
        for ( i = 0; i < lenth; i++)
            a[ i ] = ( data[ i ] - '0' ) * ( lenth + 1 );
        for ( i = lenth - 1; i > 0; i-- )
            if ( a[ i ] >= 10 )
            {
                a[ i - 1 ] += a[ i ] / 10;
                a[ i ] %= 10;
                if ( a[ i ] != 9 ) 
                {
                    t = false;
                    break;
                }
            }
        if ( a[ 0 ] != 9 ) t = false;
        if ( t ) printf("%s is cyclic\n", data);
        else printf("%s is not cyclic\n", data);
    }
    return 0;
}
